package com.home.dao;

import java.sql.Connection;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

public class Basedao {
  public static Connection getConnection(){
	  Connection con=null;
	  try {
		Context co=new InitialContext();
		DataSource datasource=(DataSource)co.lookup("java:comp/env/jdbc/home");
		con=datasource.getConnection();
	} catch (Exception e) {
		e.printStackTrace();
	}
	  return con;
  }
}
